package com.atguigu.yygh.order.utils;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/*==========================================
      时 间:   2022-03-18
      讲 师:   刘  辉
      描 述:   尚硅谷教学团队
 ==========================================*/
@Component
public class ConstantPropertiesUtil implements InitializingBean {

    @Value("${weixin.pay.appid}")
    private String appid;

    @Value("${weixin.pay.partner}")
    private String partner;

    @Value("${weixin.pay.partnerkey}")
    private String partnerKey;

    @Value("${weixin.pay.cert}")
    private String cert;



    public static   String APPID;
    public static   String PARTNER;
    public static   String PARTNERKEY;
    public static   String CERT;

    @Override
    public void afterPropertiesSet() throws Exception {
       this.APPID=appid;
       this.PARTNER=partner;
       this.PARTNERKEY=partnerKey;
       this.CERT=cert;
    }
}
